Build, test, and submit your app using Xcode, Apple's integrated development environment.

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
8.9k
May ’24
Avoid IPv6 communication when debugging with real device
We are experiencing troubles in our organization when we want to debug iOS applications on physical iPhones and iPads. Our iPhones (iPhone 16e, iOS 18.5) are not recognized by Xcode 16.4, but in the Finder they show up fine using the USB cable. We are aware, that the communication is different and there is an ad-hoc network that gets created to exchange the device profile. Together with our IT department responsible for our security infrastructure we narrowed it down to the following reason: As we are blocking all IPv6 traffic for local networking, the iPhone cannot communicate with Xcode to make the first connection and load the device profile. As they are not planning on changing this behavior, I am reaching out to you, if there is a way to force this first handshake between Xcode and iOS device to use IPv4? Or is there any other way to enable debugging for these devices? Any ideas would be very helpful.
3
0
208
6h
AppleWatchのデベロッパモードをONにする方法
開発アプリで通知確認を行うため、UDIDをプロビジョニングプロファイルに追加する必要があります。 iPhoneのUDIDは取得することができたのですが、AppleWatchのUDIDを取得する方法が分かりません。 Xcodeと接続してUDIDを取得しようとしましたが、iPhoneのみ認識がされAppleWatchが認識されていません。 AppleWatchもデベロッパモードをONしなければならないとAppleから返答をもらったが、その方法がわからないのでどなたかご教授お願い致します。
0
0
14
7h
Building macOS apps with Xcode 26 on macOS 26 VM
I'm trying to setup a macOS 26 build environment in a VM (using UTM and the virtualization framework Apple provides). I have Xcode 26 installed and have logged into my Apple ID and verified that the team and other configuration looks fine in Xcode settings. When trying to build the macOS app, I see errors saying the VM's device ID has not been registered. I have confirmed that the device ID is registered both in the Provisioning portal AND the downloaded .provisionprofiles (in Library > Developer > Xcode > UserData). This problem appears on multiple targets (e.g. the main app and extensions). If I try to manually provision the app, using the Provisioning portal, I can build the product, but it will not launch because of Gatekeeper issues. Finally, signing to run locally doesn't work either. As the app launches, frameworks refuse to load because Team IDs don't match. With ad hoc provisioning, there are no Team IDs. I've come to the conclusion that this just isn't possible. Which is a shame because I need to support products with a build environment on macOS 15 and cannot move over to macOS 26 yet. I suspect many developers outside of Apple are in a similar position.
45
11
6.9k
1d
90714: Invalid binary. The app contains one or more corrupted binaries. Please rebuild the app and resubmit.
I'm getting this error from inside the TestFlight tab in Appstore Connect. For a MacCatalyst app. This has worked for amost 4 years now I'm getting this error. I did update my version of Xcode to 26.0.1. And I migrated all the project settings it asked me to migrate. I ran the Validation in the Archive window of Xcode. No issues found there.
5
0
76
1d
Xcode 26.0.1 launch fails with error "Loading a Plugin Failed."
Hi All, I have recently upgraded my Silicon Mac Laptop from MacOS 15.3 (Sequoia) to MacOS 26 (Tahoe). Since existing Xcode 16.2 is not compatible with MacOS 26, i installed Xcode 26.0.1 but after the successful installaton the application is not working and quits after the erorr dialog "Loading a Plugin Failed." (Screenshot attached). I tried resatring/reinstalling the Xcode 26.0.1 but no luck. To narrow down the issue i installed the same Xcode 26.0.1 in another Silicon Mac laptop with MacOS 26(Tahoe) where no previous Xcode was installed and it went well and working as expected. With my assumption Xcode 26.0.1 breaks when the device is upgraded from sequoia to Tahoe due to some conflicting old Xcode settings/files which may not be compatible with Xcode 26 or Tahoe but i am not sure. I followed some old articles as below from the forum and nothing worked for me so far. https://developer.apple.com/forums/thread/660860 https://developer.apple.com/forums/thread/719810 https://developer.apple.com/forums/thread/759396 Can some one shed a light on this to resolve this issue? Thanks.
0
0
41
1d
Xcode 26 crash upon dealloc of `WKNavigationResponse` on Main Thread
Since Xcode 26 our tests are crashing due to the Main Thread not being able to deallocate WKNavigationResponse. Following an example: import Foundation import WebKit final class WKNavigationResponeMock: WKNavigationResponse { private let urlResponse: URLResponse override var response: URLResponse { urlResponse } init(urlResponse: URLResponse) { self.urlResponse = urlResponse super.init() } convenience init(httpUrlResponse: HTTPURLResponse) { self.init(urlResponse: httpUrlResponse) } convenience init?(url: URL, statusCode: Int) { guard let httpURLResponse = HTTPURLResponse(url: url, statusCode: statusCode, httpVersion: nil, headerFields: nil) else { return nil } self.init(httpUrlResponse: httpURLResponse) } } import WebKit import XCTest final class ExampleTests: XCTestCase { @MainActor func testAllocAndDeallocWKNavigationResponse() { let expectedURL = URL(string: "https://galaxus.ch/")! let expectedStatusCode = 404 let instance = WKNavigationResponeMock() // here it should dealloc/deinit `instance` automatically } Here the call stack: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 CoreFoundation 0x101f3dd54 CFRetain.cold.1 + 16 1 CoreFoundation 0x101e14860 CFRetain + 104 2 WebKit 0x10864dd24 -[WKNavigationResponse dealloc] + 52
5
0
458
1d
iOS Enterprise App Build Showing “Requires iOS 26.0” Even Though Deployment Target Set to iOS 18.0
We’re facing an issue when trying to install an enterprise-distributed iOS app on devices running iOS 18.5. During installation, we receive this error message: “This iOS app requires a newer version of iOS. You need to update this iPhone to iOS 26.0 to install this app.” However, in Xcode 26.0.1, our app’s minimum deployment target is explicitly set to iOS 17.6. After adding this step and the app result is unable to install the app on ios 18.5 and message getting as per the above quotes. Kindly help me out this issues.
0
0
50
1d
How can I remove a localization from a String Catalog in a Swift Package?
Hello, I'm trying to remove a localization from a String Catalog in a Swift Package. How can I do that? I tried to remove the file and create a new one, but all the languages are back. The only place where I've found a reference to the languages is in Package/.swiftpm/xcode/package.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate But I don't know how to edit this file to remove a language. Thank you, Axel
2
0
77
1d
Xcode downloads window won't go away
Every time I launch Xcode 26.0 (17A324), I see this window: Consequently, each time I launch Xcode, I must manually close the Downloads window, and it will always reappear the next time I launch Xcode. My question: How can I make the Downloads window with this message go away permanently, so I don't have to manually dismiss it? I tried deleting Device Support for Vision Pro (M5) and iPad Pro (M5) from Settings > Components, but unfortunately this is what I see: Thank you for any guidance you can provide.
3
1
91
1d
I can't run or create a simulator that isn't iOS26 after downloading the Xcode Beta 3
I downloaded the Xcode Beta 3 on my MacBook Pro M4 Base today and tested out some iOS26 mechanics of my app. And when I came back to my main Xcode to continue developing in iOS18, I couldn't build my app. I went to Product > Destination > Manage run destinations and then tried to create a simulator with iOS18 but it didn't show up, only choice that's showing up was iOS26. I tried deleting iOS18 platform and downloading it again but it didn't solve, I tried deleting Xcode Beta but it didn't solve the problem either. I deleted Runtimes folder, it didn't solve too. I can not create a simulator of iOS18 or below too, the error says "The iOS 18.5 simulator runtime is not available. Try reinstalling Xcode or the simulator runtime." How can I fix this problem?
5
1
382
2d
Can’t Debug background.js in Safari App Extension (Manifest V3)
I’m developing a Safari App Extension and I want to debug the background.js script. However, I can’t find any tool or option to do this. When I run the extension from Xcode using the ProjectName Extension (macOS) scheme, I expect to see a “ProjectName” item under the Develop → Web Extension Background Content menu. But there’s nothing there. Has anyone encountered the same issue? How did you fix it? Environment: Manifest Version: V3 Safari: 26.0.1 (21622.1.22.11.15) Xcode: 26.0.1 (17A400)
0
0
324
2d
Persistent MTLCommandQueue.h Corruption (dispatchType missing) Despite macOS Erase & Reinstall (Xcode 26.0.1 / macOS 26.0.1)
Hello Developers and Apple Engineers, I am encountering a persistent and highly unusual Xcode build failure when trying to use Metal APIs, specifically related to MTLCommandQueueDescriptor. I have exhausted all standard troubleshooting steps, including a complete erase and reinstall of macOS, yet the issue remains. Hardware diagnostics have passed. I am seeking insights or potential solutions. The Problem: When compiling any project (including brand new, empty macOS App projects) that attempts to set the dispatchType property on an MTLCommandQueueDescriptor instance, the build fails with the following errors: Swift // Code causing the error: let queueDescriptor = MTLCommandQueueDescriptor() queueDescriptor.dispatchType = .userInteractive // <-- Error occurs here // Compiler Errors: Value of type 'MTLCommandQueueDescriptor' has no member 'dispatchType' Cannot infer contextual base in reference to member 'userInteractive' Key Evidence - Physical Header File Corruption: The root cause appears to be a physically corrupted/incomplete SDK header file. Using the cat command in Terminal to inspect the contents of the relevant Metal header file confirms that the definition for MTLCommandQueueDescriptor is missing the dispatchType property: Bash cat /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Versions/A/Headers/MTLCommandQueue.h The output consistently shows MTLCommandQueueDescriptor only having maxCommandBufferCount and logState properties, even after a fresh OS and Xcode installation. Environment: macOS: Version 26.0.1 (Build 25A362) - Clean install via Erase and Reinstall from Recovery. Xcode: Version 26.0.1 (Build 17A400) - Installed fresh from Mac App Store after OS reinstall. Mac Hardware: MacBook Pro (14-inch, M3) - (Please confirm this model info is accurate) Hardware Diagnostics: Passed (Tested at an official Apple Store). Exhaustive Troubleshooting Steps Performed (Issue Persists After All): Standard Xcode Cleaning: Clean Build Folder (Shift+Cmd+K). Manually deleted DerivedData folder (~/Library/Developer/Xcode/DerivedData). Deleted Xcode Caches (~/Library/Caches/com.apple.dt.Xcode, com.apple.dt.xcodebuild). Command Line Tools Path: Correctly set using sudo xcode-select -s /Applications/Xcode.app/Contents/Developer. Verified path using xcode-select -p. Verified version using xcodebuild -version. Multiple Xcode Versions & Install Methods Attempted (Before OS Reinstall): Xcode 26.0.1 (App Store). Xcode 26.0.1 (.xip package from Developer Portal). Xcode 26.1 Beta 3 (.xip package from Developer Portal). Performed thorough cleaning (deleted ~/Library/Developer, /Library/Developer, caches, rebooted) before each .xip installation attempt. In all cases, cat command confirmed the header file remained corrupted on disk after installation. Hardware Check: Took the Mac to an official Apple Store. Hardware diagnostics passed without any issues reported. Complete OS Reinstallation: Booted into Recovery Mode. Used Disk Utility to completely erase the internal SSD (APFS, GUID Partition Map). Reinstalled macOS 26.0.1 from Recovery. Set up the Mac as a new device (did not restore from backup). Post-OS Reinstall: Installed Xcode 26.0.1 fresh from the Mac App Store. Set command line tools path correctly. Created a brand new macOS App project (MetalTest). Pasted the minimal code to reproduce the issue into AppDelegate.swift. Build failed with the exact same errors. Ran the cat command again, confirmed the MTLCommandQueue.h file on the fresh system is STILL missing the dispatchType property. Request for Help: Given that the SDK header file corruption persists even after a complete macOS erase and reinstall, and hardware diagnostics have passed, I am at a loss for the cause or further troubleshooting steps. Has anyone encountered a similar situation where core SDK files remain corrupted despite a clean OS install and passing hardware checks? Are there any deeper system caches or states that might survive an erase/reinstall and interfere with SDK file integrity? Are there any more advanced diagnostic steps recommended? Any insights or suggestions from Apple engineers or the community would be greatly appreciated. Thank you. I have previously contacted Apple Developer Support regarding this issue, case ID: 102731239935.
0
0
45
3d
File download not working in Xcode 26.0 RC
Hello Apple Developer Community, I'm experiencing an issue with file download functionality in the iOS Simulator after updating to Xcode 26 RC (Build 17A321). Issue Description: When attempting to download files in the iOS Simulator via Safari, the download prompt appears correctly, but after tapping the 'Download' button, files are not being saved to the Files app. The download appears to do nothing with no error message, no indication of failure, but the file simply doesn't appear in Downloads or anywhere in the Files app. Environment: Xcode Version: 26.0 RC (17A321) iOS Simulator Version: 26.0 RC (23A339) Device Simulated: iPhone Air Steps to Reproduce: Open Safari in the iOS Simulator Navigate to a downloadable file (PDF, ZIP, etc.) Tap to initiate download Download prompt appears as expected Tap the 'Download' button Check the Files app → Downloads folder (empty) Expected Behavior: Files should download normally as they do on physical devices and as they did in previous Xcode versions. Actual Behavior: The download prompt dismisses after tapping 'Download', but no file appears in the Files app. No error message is shown, and there's no indication that the download failed, it simply appears as if nothing happened. Additional Information: Downloads work correctly on physical device (iOS 26 RC 23A340) This functionality worked properly in previous Xcode versions I have created a bug report to Feedback assistant: FB20190927 Thanks in advance for any assistance.
6
1
344
3d
PHAssetChangeRequest deleteAssets not working some time
Hello Team, I try to delete photo from Photos for that i used this method, [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ [PHAssetChangeRequest deleteAssets:@[assetToDelete]]; completionHandler:^(BOOL success, NSError *error) { }]; This method pops up a dialog with Don't Allow or Delete. But some time in some iPhones not respond PHAssetChangeRequest deleteAssets method that's why that completionHandler not called because of that i can't perform any operation of PHPhotoLibrary then after. If I restart my iPhone then it works. Many users of my app complained about this issue. I have an iPhone 11 with iOS 15.3. But some iOS 12,14,16 users also face the same issue. So what exact issue is there? Is it related to iOS or a method? Thanks, Ankur
3
3
906
3d
Could not launch “App” (Xcode26.0 + iPhone6(iOS12))
Problem Details : Could not launch “App” Reproduction Route : Install Xcode26.0 > Connect to iPhone6(iOS12) > Run app We tried this solution but didn't work. To make Xcode 26 recognize and run apps on an iOS 12 physical device, you can manually add the missing device support files by going to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ on your Mac, where you’ll see folders like 17.0 or 18.0; download the matching iOS 12 folder (for example, 12.4) from the community-maintained repository.
1
0
60
4d